def f(n):
    if n == 1:
        return 1
    else:
        return f(n - 1) + n
n = int(input('请输入一个正整数：'))
print('S=1+2+3+…+n:',f(n))